import type {SVGIconProps} from './svgIcon';
import {SvgIcon} from './svgIcon';

interface Props extends SVGIconProps {
  locked?: boolean;
}

export function IconLock({locked = false, ...props}: Props) {
  return (
    <SvgIcon {...props}>
      {locked ? (
        <path d="M8 0C10.49 0 12.5 2.01 12.5 4.5V6.52C13.35 6.64 14 7.37 14 8.25V12.75C14 13.72 13.22 14.5 12.25 14.5H3.75C2.78 14.5 2 13.72 2 12.75V8.25C2 7.37 2.65 6.64 3.5 6.52V4.5C3.5 2.01 5.51 0 8 0ZM3.75 8C3.61 8 3.5 8.11 3.5 8.25V12.75C3.5 12.89 3.61 13 3.75 13H12.25C12.39 13 12.5 12.89 12.5 12.75V8.25C12.5 8.11 12.39 8 12.25 8H3.75ZM8 1.5C6.34 1.5 5 2.84 5 4.5V6.5H11V4.5C11 2.84 9.66 1.5 8 1.5Z" />
      ) : (
        <path d="M11 0C13.49 0 15.5 2.01 15.5 4.5V7.25C15.5 7.66 15.16 8 14.75 8C14.34 8 14 7.66 14 7.25V4.5C14 2.84 12.66 1.5 11 1.5C9.34 1.5 8 2.84 8 4.5V6.5H10.25C11.22 6.5 12 7.28 12 8.25V12.75C12 13.72 11.22 14.5 10.25 14.5H1.75C0.78 14.5 0 13.72 0 12.75V8.25C0 7.28 0.78 6.5 1.75 6.5H6.5V4.5C6.5 2.01 8.51 0 11 0ZM1.75 8C1.61 8 1.5 8.11 1.5 8.25V12.75C1.5 12.89 1.61 13 1.75 13H10.25C10.39 13 10.5 12.89 10.5 12.75V8.25C10.5 8.11 10.39 8 10.25 8H1.75Z" />
      )}
    </SvgIcon>
  );
}
